package com.ztjy.statis.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ztjy.bean.CkStatis;
import com.ztjy.bean.RkStatis;
import com.ztjy.statis.biz.RkStatisBiz;
import com.ztjy.statis.dao.RkStatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RkStatisBizImpl implements RkStatisBiz {
    @Autowired
    private RkStatisDao rkdao;

    @Override
    public PageInfo<RkStatis> findAllRkStatis(RkStatis rkStatis, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<RkStatis> allRkStatis = rkdao.findAllRkStatis(rkStatis);
        PageInfo<RkStatis> pageInfo=new PageInfo<RkStatis>(allRkStatis);
        return pageInfo;
    }

    @Override
    public PageInfo<RkStatis> findRkstatisById(Integer warehouseId,Integer pageNo,Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<RkStatis> rkstatisById = rkdao.findRkstatisById(warehouseId);
        PageInfo<RkStatis> pageInfo=new PageInfo<RkStatis>(rkstatisById);
        return pageInfo;
    }

    @Override
    public List<RkStatis> findtiaozhuang() {
        return rkdao.findtiaozhuang();
    }
}
